#set(title='编辑图书',menu='book')
#@user_layout()
#define user_main()
	 <h1 class="page-header">#(title)</h1>
	 <div class="row">
			<ol class="breadcrumb">
			  <li><a href="#(ctx)/book/list">图书管理</a></li>
			  <li class="active">编辑图书</li>
			</ol>
		</div>
     <div>
     	<form class="form-horizontal" action="#(ctx)/book/doedit" method="post" enctype="multipart/form-data">
			  <div class="form-group">
			    <label class="col-sm-4 control-label">书名</label>
			    <div class="col-sm-4">
			      <input type="text" name="name" value="#(book.name)" class="form-control" placeholder="" required>
			    </div>
			  </div>
			  <div class="form-group">
			    <label class="col-sm-4 control-label">作者</label>
			    <div class="col-sm-4">
			      <input type="text" name="author" value="#(book.name)" class="form-control" placeholder="" required>
			    </div>
			  </div>
			  <div class="form-group">
			    <label class="col-sm-4 control-label">类别</label>
			    <div class="col-sm-4">
			    	<select name="category" class="form-control" placeholder="" required>
			    		<option value="小说">小说</option>
			    		<option value="文艺">文艺</option>
			    		<option value="童书">童书</option>
			    		<option value="教育">教育</option>
			    		<option value="人文社科">人文社科</option>
			    		<option value="经管">经管</option>
			    		<option value="生活">生活</option>
			    	</select>
			    </div>
			  </div>
			  <div class="form-group">
			    <label class="col-sm-4 control-label">简介</label>
			    <div class="col-sm-7">
			      <textarea name="summary" class="form-control" placeholder="" required>#(book.summary)</textarea>
			    </div>
			  </div>
			  <div class="form-group">
			    <label class="col-sm-4 control-label">价格</label>
			    <div class="col-sm-4">
			      <input type="number" name="price" value="#(book.price)" class="form-control" placeholder="" required>
			    </div>
			  </div>
			  <div class="form-group">
			    <label class="col-sm-4 control-label">数量</label>
			    <div class="col-sm-4">
			      <input type="number" name="inventory" value="#(book.inventory)" class="form-control" placeholder="" required>
			    </div>
			  </div>
			  <div class="form-group">
			    <label class="col-sm-4 control-label">出版社</label>
			    <div class="col-sm-4">
			      <input type="text" name="publisher" value="#(book.publisher)" class="form-control" placeholder="" required>
			    </div>
			  </div>
			  <div class="form-group">
			    <label class="col-sm-4 control-label">出版日期</label>
			    <div class="col-sm-4">
			      <input type="date" name="pubDate" value="#(book.pubDate)" class="form-control" placeholder="" required>
			    </div>
			  </div>
			  <div class="form-group">
			    <label class="col-sm-4 control-label">详情描述</label>
			    <div class="col-sm-7">
			      <textarea name="description" class="form-control" placeholder="">#(book.description)</textarea>
			    </div>
			  </div>
			  <div class="form-group">
			    <label class="col-sm-4 control-label">图书图片</label>
			    <div class="col-sm-4">
			      <input type="file" name="bookImg" placeholder="" accept="image/*">
			      <img src="#(uploadPah)#(book.bookImg)" class="img-responsive" alt="book image">
			    </div>
			  </div>
			  <input type="hidden" name="id" value="#(book.id)">
			  <div class="form-group">
			    <label class="col-sm-4 control-label">详情图片</label>
			    <div class="col-sm-4">
			      <input type="file" name="descImg" placeholder="" accept="image/*">
			      <img src="#(ctx)/upload/#(book.descImg)" class="img-responsive" alt="desc image">
			    </div>
			  </div>
			  <div class="form-group">
			    <div class="col-sm-offset-5 col-sm-2">
			      <button type="submit" class="btn btn-success btn-block">保存</button>
			    </div>
			  </div>
			</form>
     </div>
#end
